﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using S3_Sync.Tabbed;
using S3_Sync.ViewModel;

namespace S3_Sync
{
    public class MainWindowVM : ViewModelBase
    {
        public MainWindowVM()
        {

        }

        #region ViewModel Declarations

        #region GeneralVM

        private GeneralVM general;
        public GeneralVM General
        {
            get
            {
                if (general == null)
                    general = new GeneralVM(); //<----this is called "Lazy Loading" and is used in times where
                return general;                 //you may not need to create general (say, if they didn't ever click general)
            } //lazy loading costs you nothing and (WORST CASE->) is no different from declaring private AccountsVM accounts = new AccountsVM()
            set
            {
                general = value;
                NotifyPropertyChanged("General");
            }
        }

        #endregion GeneralVM

        #region S3VM

        private S3VM s3;
        public S3VM S3
        {
            get
            {
                if (s3 == null)
                    s3 = new S3VM();
                return s3;
            }
            set
            {
                s3 = value;
                NotifyPropertyChanged("S3");
            }
        }

        #endregion S3VM

        #region FilesVM

        private FilesVM files;
        public FilesVM Files
        {
            get
            {
                if (files == null)
                    files = new FilesVM();
                return files;
            }
            set
            {
                files = value;
                NotifyPropertyChanged("Files");
            }
        }

        #endregion FilesVM

        #endregion ViewModel Declarations

    }
}
